package My.example.tes;

import My.example.config.springconfig;
import My.example.domain.Account;
import My.example.service.AccountService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.List;

//一样是转账只是这次是2给1转
public class te2 {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(springconfig.class);
        AccountService service=context.getBean(AccountService.class);

        service.transfer("user2","user1",100d);
        service.findAll().forEach(System.out::println);
        List<Account> accounts= service.findAll();
        System.out.println(accounts);
    }
}
